package com.xncoding.testng.listener;

import org.testng.ITestContext;

import org.testng.ITestResult;

import org.testng.TestListenerAdapter;

public class MyCaseListener extends TestListenerAdapter {
    @Override

    public void onStart(ITestContext testContext) {
        System.out.print("*****start*****\n");

        super.onStart(testContext);

    }

    @Override

    public void onFinish(ITestContext testContext){

        System.out.print("*****test finish****\n*");

        super.onFinish(testContext);

    }

    @Override

    public void onTestFailure(ITestResult tr) {
        System.out.print("*****test failure*****\n");
//        tr.set;
        super.onTestFailure(tr);

    }

    @Override

    public void onTestSuccess(ITestResult tr) {
        System.out.print("*****test success*****\n");

        super.onTestSuccess(tr);

    }

}
